mov r1, 0x0000 //store the intial counter value into Count 
st	r1, CountValue 

MainLoop: 
ld	r1, CountValue 
**do stuff here that depends on the count value** 
add	r1,r1,1 
st	r1, CountValue 
bra MainLoop